import "reflect-metadata"
import { DataSource } from "typeorm"
import { Photo } from "./entity/Photo"
import { User } from "./entity/User"

export const AppDataSource = new DataSource({
  type: "mysql",
  host: "localhost",
  port: 3306,
  username: "root",
  password: "wangdong123!",
  database: "typeorm_demo",
  synchronize: true,
  logging: true,
  logger: 'simple-console',
  // entities: [User, Photo],
  entities: [__dirname + "/entity/*.ts"],
  migrations: [],
  subscribers: [],
})
